package com.mxpio.erp.common.oa.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.jpa.policy.impl.UUIDPolicy;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_OA_BUSINESS_TRIP_APPLY_LINE")
@Schema(description="出差申请单-行程明细")
public class OaBusinessTripApplyLine extends BaseEntity {

    @Id
    @Generator(policy = UUIDPolicy.class)
    @Column(name = "ID_")
    @Schema(description = "主键")
    private String id;

    @Column(name = "BIZ_NO_")
    @Schema(description = "报销单编号")
    private String bizNo;

    @Column(name = "START_TIME_")
    @Schema(description = "开始时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date startTime;

    @Column(name = "END_TIME_")
    @Schema(description = "结束时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    private Date endTime;

    @Column(name = "DEPARTURE_")
    @Schema(description = "出发地")
    private String departure;

    @Column(name = "DESTINATION_")
    @Schema(description = "目的地")
    private String destination;

    @Column(name = "TRANSPORTATION_")
    @Schema(description = "交通方式")
    @Dict(dicCode = "MB_ERP_OA_TRIP_TRANSPORTATION")
    private String transportation;

    @Column(name = "MEMO_")
    @Schema(description = "备注")
    private String memo;


}
